from rest_framework import serializers
from .models import Publisher
from Book.serializer import BookSerializer

class PublisherSerializer(serializers.ModelSerializer):
    publisher=BookSerializer(read_only=True,many=True)
    class Meta:
        model = Publisher
        fields = ['id','name','address','publisher']